package com.theobserver.theobserver;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ListView;

/**
 * Created by wssxk on 7/7/17.
 */

public class CatalogSelectActivity extends Activity {

    public void onCreate(Bundle savedInstance)
    {
        super.onCreate(savedInstance);
        setContentView(R.layout.catalog_select_activity);
        ListView lv = (ListView) findViewById(R.id.listview_catalog_select);
        lv.setAdapter(new NewsCatalogAdapter(CatalogSelectActivity.this));
    }

}


class NewsCatalogAdapter extends BaseAdapter
{
    Context mContext = null;
    public NewsCatalogAdapter(Context context)
    {
        mContext = context;
    }

    public int getCount()
    {
        return 15;
    }

    public long getItemId(int pos)
    {
        return pos;
    }

    public Object getItem(int pos)
    {
        return null;
    }

    public View getView(int pos, View convertview, ViewGroup root)
    {
        return View.inflate(mContext, R.layout.catalog_select_item, null);
    }
}
